#ifndef FMT_MATH_H__
#define FMT_MATH_H__

#include <math.h>

/* Config the macro definitions for math library selection */
#define USE_QX_MATH

#if defined (USE_ARM_MATH) /* ARM Cortex-M math lib */
#include <arm_math.h>
/* Redefine the math functions */
#define fmt_cos_f32 arm_cos_f32
#define fmt_sin_f32 arm_sin_f32
#elif defined (USE_QX_MATH) /* QX-DSP math lib */
static inline float qx_cos_f32(float x)
{
    return cosf(x);
}
static inline float qx_sin_f32(float x)
{
    return sinf(x);
}
/* Redefine the math functions */
#define fmt_cos_f32 qx_cos_f32
#define fmt_sin_f32 qx_sin_f32
#endif

#endif
